           <?php 
           
           echo '<pre>';
           //$credit['group']// diem tong cua group
           //$credit['id']// diem tong cua id
          // print_r($credit);
           echo '</pre>';
           ?>  
<div class="content_article"  id="acct">
           <div class="mota">
            <div class="img_list_group">
                Danh sách thành viên
            </div>
           </div>
                
                <table class="tb_group clearfix">
                     <form>
                        <tr>
                           <th class="first_id"><a title="id" href="#" class="order">id</a></th>
                            <th><a title="title" href="#" class="order">Username</a></th>
                            <th><a title="email" href="#" class="order">Email</a></th>
                            <th><a title="phone" href="#" class="order">Phone</a></th>
                            <th><a title="yahoo" href="#" class="order">Yahoo</a></th>
                            
                            <th><a title="" href="#" class="">Total</a></th>
                            <th><a title="" href="#" class="">curent</a></th>
                            <th><a title="" href="#" class="">pending</a></th>
                            <th>View</th>
                            <th>edit</th>
                            <th>del</th>
                            <!--th class="tb_check"><input class="checkall" type="checkbox" /></th-->
                        </tr>
                        <?php
                        if(!empty($dulieu)){
                            foreach($dulieu as $dulieu){?>                                
                         <tr>
                            <td class="first_id"><?php echo $dulieu->id;?></td>
                            <td><?php echo $dulieu->username;?></td>
                            <td><?php echo $dulieu->email;?></td>
                            <td><?php echo $dulieu->phone;?></td>
                            <td><?php echo $dulieu->yahoo;?></td>
                            <td class="total_td">$ <?php if(!empty($credit[$dulieu->id]->total)){echo $credit[$dulieu->id]->total;}else echo 0;?></td>
                            <td class="curent_td">$ <?php if(!empty($credit[$dulieu->id]->curent)){echo $credit[$dulieu->id]->curent;}else echo 0;?></td>
                            <td class="pending_td">$ <?php if(!empty($credit[$dulieu->id]->pending)){echo $credit[$dulieu->id]->pending.'<div class="payout_tb hide"><a href="'.base_url().'group/subgroup/pay/'.$dulieu->id.'">pay</a><div>';}else echo 0;?></td>
                            <td class="view span30"><a href="<?php echo base_url().'group/subgroup/listacc/'.$dulieu->id;?>">view</a></td>
                            <td class="edit span30"><a href="<?php echo base_url().'group/subgroup/edit/'.$dulieu->id;?>">edit</a></td>
                            <td class="del span30"><a href="<?php echo base_url().'group/subgroup/delete/'.$dulieu->id;?>">del</a></td>
                            <!--td class="tb_check"><input type="checkbox" name="checkb[]" value="<?php echo $dulieu->id;?>" /></td-->
                        </tr>   
                                
                        <?php    }
                        }
                        ?>
                       </form>                          
                    </table><!-- end table content--> 
                   
                  <script>
                    $(document).ready(function(){
                       $('.pending_td').each(function(){
                            if($(this).text()!='$ 0'){
                                $(this).addClass('blink_td');
                            }
                       })
                       .hover(function(){
                            var top = $(this).position().top-17;
                            var left = $(this).position().left+22;
                            $(this).find('.payout_tb').css({top:top,left:left}).show(500);
                       },function(){
                            $('.payout_tb').hide();
                       }
                       
                       )
                        
                        
                    });
                    
                    </script>  
</div>